package com.lidong.lowcode.model.controller;

import com.lidong.config.controller.BaseController;
import com.lidong.config.domain.common.PageParam;
import com.lidong.config.domain.gloabreturn.PageInfoVO;
import com.lidong.lowcode.model.domain.BaseDataSource;
import com.lidong.lowcode.model.service.DataSourceService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author LiDong
 * @version 1.0.0
 * @createTime 5/3/2022 5:24 PM
 */
@RestController
@RequestMapping("/lowcode/model/datasource")
public class DataSourceController extends BaseController {

    @Autowired
    private DataSourceService dataSourceService;

    /**
     * 分页查询
     *
     * @param pageParam pageParam
     * @return PageInfoVO
     */
    @RequestMapping("/page")
    public PageInfoVO<BaseDataSource> getPageBaseDataSource(@RequestBody PageParam pageParam) {
        return dataSourceService.getPageBaseDataSource(pageParam);
    }

}
